Systems and methods herein generally relate to document workflow automation systems and more particularly to providing mechanisms to enable FIFO behavior for selected workflow tasks in multi-document jobs.
In a document workflow automation system, a workflow description specifies a set of transformations that are applied to the document(s) of a job to produce a particular output. These transformations are cumulative insomuch that the output of a node in the workflow is the input of the following node. In the execution of the workflow, in addition to the sequential processing, a document may be routed to one of many possible branches: the document may loop back to a previous point of the workflow; a document may be split into multiple documents and multiple documents may be joined into single document; etc. What happens to each of the documents depends not only on the workflow specification but also on the characteristics of the document itself such as the presence of color, the number of pages, the media used, etc. Simple jobs may contain a single document, while complex jobs may contain multiple related documents. Given that each document in a multi-document job would use a different set of transformations, each of the documents that traverse the workflow is in an independent thread of execution.
One of the nodes that can be specified in a workflow is the operation of sending the document to an output destination, and in particular to a production printing device. When a multi-document job is sent to a workflow, it is sometimes mandated that the order in which the documents are printed at a particular device corresponds to the order that was given to the documents when they were submitted to the workflow. This is sometimes referred to as a first-in, first-out (FIFO) ordering. For example, a workflow may be printing different chapters of a book, and the chapters should be printed in sequential order to allow the printed pages of the book to be assembled in the same order that the chapters are ordered.
This FIFO request is compounded by the fact that some printers do not guarantee a FIFO behavior. For example, one may finish the submission of a large document to the device before they start the submission of a small document to the same queue of the device. Nevertheless, because the large document takes more time to process at the device (e.g., raster image processing (RIP)), the printing of the smaller document may be completed first. This desired printing behavior is just one example of document processing operations that should be executed in a specific sequential order corresponding to the order given at job submission time. For example, collation of corresponding documents also has similar requirements.
Given the workflow execution model, documents that belong to the same job may arrive at any printing node (or any node for that matter) out of the requested sequential order. Also, the documents that arrive to the printing node may not have a direct correspondence to the input documents as they may have been derived through split and join operations. Documents could be routed to different branches on the workflow, without one being able to determine in advance how many documents would actually reach any given print node at any given point in the workflow.
One challenge is to extend the job specification and the workflow engine capabilities to enable FIFO behavior, while at the same time maintaining efficiency on utilization of resources at the workflow engine.